package DigiJoe;


public class Wire {

    //current value
    private Sign digitalValue;

    //kire van rakotve
    private DigitalElement outElement;

    //ki van rakotve
    private DigitalGate inGate;

    //Kimeneti port
    private int outPort;

    //Bemeneti port
    private int inPort;

    //konstruktor
    public Wire (DigitalElement OutElement, DigitalGate InGate, int OutPort, int InPort) {
        //belso valtozo init
        this.outElement = OutElement;
        this.inGate = InGate;
        this.inPort = InPort;
        this.outPort = OutPort;
    }

    public int getInport() { return inPort; }
    public int getOutport() { return outPort; }

    
    //ki van rakotve?
    public DigitalElement GetOutElement() { return outElement; }

    //ki van ram kotve?
    public DigitalGate GetInGate() { return inGate; }

    //getter a digitalvaluenak
    public Sign getDigitalValue () {
        return digitalValue;
    }

    //setter a digitalvalue nak
    public void setDigitalValue (Sign value) {
        this.digitalValue = value;
    }

    //reset, alacsonyba allitja a vezeteket
    public void reset () {
        digitalValue = Sign.Low;
    }

}

